home *** CD-ROM | disk | FTP | other *** search
- DRIVING ISTAR
-
- WHAT DO I NEED TO START IT?
-
- Normally you don't need to bother about this lot as they are set up during
- installation and Amiga startup. But if something goes wrong then this list
- might help.
-
- # assign KBTools: to some directory for best effect
- # assign IstarSys: to some directory for prefs files (and, in future,
- other things)
- # iff.library (can run without it)
- # asl.library is needed for saving etc. (supplied with Amiga 1200)
- # Fonts needed depends now on IstarSys:IstarPrefs but the defaults are:
- # Courier 11
- # Garnet 16
- (all supplied with standard 1200).
-
- HOW DO I START IT?
-
- This describes the normal start of Istar, from WorkBench.
-
- (If you are operating with low memory, such as a base A1200, then refer to
- the section below on 'Starting with Low Memory'. If you start from CLI, a
- few options are available in Version 1.04 onwards; see later.)
-
- Note: Bold is often used for concepts and jargon terms used in Istar when
- they are first used. Italics is often used for some action you should
- take. 'Oops' is used to tell you what to do if things don't seem to be
- going as expected.
-
-
- 1. Double click on the Istar icon.
-
- 2. You will be presented with a grey Control Screen part way up the view.
- Initially this has 'Istar' on its title bar but that is soon obscured by a
- horizontal strip and, at the left, the Initial Control Panel.
-
- 3. Click the 'New' button, and two things will happen. First another
- screen, a large blank white one appears. This is the Easel on which you
- draw your KB (knowledge base). And, on the Control Screen, another panel
- appears with columns of buttons and two list gadgets. (If you are
- operating with limited memory, the standard Easel size (30 by 24 inches)
- might be too large, and you will have to alter the Prefs before clicking
- the New button.)
-
- Here are a few instructions to get you started ...
-
- 4. Move the mouse pointer up over the large white Easel then press left
- mouse button (LMB) and keep it down. A box appears that moves with the
- mouse. Move the mouse around. Then release LMB. (Oops: No box appears.
- Have you clicked rather than press, drag, release? Do not click it;
- clicking does something else.)
-
- 5. Draw another box, in the same way, to the right of first one.
-
- 6. Move the mouse pointer tip over the right hand edge of the left-hand
- box, and press LMB while over the edge. You will see a short line appear
- from your mouse pointer to a point one quarter the way into the box. This
- line follows the mouse as you move it. Move mouse around until line is
- over the other (right-most) box and release LMB. (The left-hand box is
- called the antecedent of the right, and the right is the consequent of the
- left.) (Oops: No line appears, but the box moves? You had the mouse
- pointer too far into the box, not exactly over the right-hand edge. Oops:
- A new box appears? You had the mouse pointer too far outside the box, not
- exactly over the right-hand edge. In either case hit Escape key; see 7
- below.)
-
- 6a. (If you wish, you can draw the line in the reverse direction: from the
- left-hand edge of the right-most box leftwards to the left-most box.)
-
- 6b. If you want to insert a bend in your line, hit Space bar when end of
- line is where you want the bend.
-
- 7. (To escape from any operation you have started but don't want, hit the
- Escape key. Then release the mouse button.)
-
- That's the basic mechanism, and the whole knowledge base can be drawn like
- that. Not too bad, is it?
-
-
- GOING FURTHER
-
- 8. Various modifications of the diagram are possible:
-
- a) Move a box by pressing LMB over the centre of the box. Dotted
- skeleton of the box and all its connecting links appears. Move mouse
- and this lot follows. Release in new position. (Note that boxes can
- overlap, though it is usually not wise to do so; overlapping is
- usually reserved to collections of boxes that are closely related
- semantically.) (Oops: No dotted skeleton appears. If a new line
- appears then you have pressed the LMB while over a right- or left-
- hand edge of the box, not near its middle. Hit Escape and try
- again.)
-
- b) Bend a drawn link by pressing LMB over a link. Dotted bent line
- follows mouse to new position; release. Pressing LMB over existing
- bend will just move the bend to new position. (Oops: line doesn't
- bend, but a box appears instead? You were not near enough to the
- line when you pressed LMB. Hit Escape and try again.)
-
- c) (Other modifications are possible e.g. to redirect a link to
- another box, or to delete a box, delete a link, delete a bend from a
- link: see below.)
-
- 9a. Entering detail, e.g. Name and Meaning. Click the Right Mouse Button
- (RMB) over centre of box. (Oops: If you get a dotted box outline as in
- 8(a) then you haven't clicked fast enough; hit escape key, release MB and
- try again. You'll soon get the hang of it.) Up comes the Control Screen,
- showing an Attribute Detail panel with around fifty gadgets. Don't panic:
- you need only the top two: Label and Meaning; ignore the others for now.
- (Oops: If a small panel comes up with half a dozen buttons - the Action
- panel - then you have clicked the wrong MB; as we shall see below, this
- comes up when you click the LMB rather than the RMB. Hit 'Done' button
- with the LMB to send it away and try again.)
-
- 9b. Along top of panel are two string gadgets which allow you to enter a
- name for the box and a longer meaning if you wish. For now, type something
- in Label string, press Return and carry on typing in Meaning string - type
- anything that you like. Then click the OK button. The Control Screen
- returns and your box should display the new name. (Oops: If you try to
- type and nothing enters either string then click LMB over the string you
- wish to type in.)
-
- 10. Showing Meaning. On the Easel, move the mouse over the box (do not
- press any mouse button). The Meaning text should appear in the horizontal
- window in the top of the Control Screen. Move mouse away, and it
- disappears. In this way, even when the box label text is too small to read
- you can easily see what a box means.
-
- 10a. (Oops: Nothing happens? Probably the Easel has not been reactivated
- after hitting the OK button. Only one panel or easel is active at any
- time. If you see the border of a panel is pink rather than grey then that
- panel is active, rather than the Easel. You can activate the Easel in
- several ways. One is to hit the 'See Easel' button on the control panel
- (not available on earliest versions of Istar). Another is to move over the
- centre of a box on the Easel, press LMB in an attempt to move it - see 8a
- above - and release or hit Escape key. Anything using LMB over Easel will
- activate it.)
-
- 11. More antecedents. Draw another couple of boxes (see 4 above) near the
- left-hand box (above or below it) and link these to the right-hand box as
- in 6 above. The right-most box now has three or more antecedents. Best
- also to name them with different names as in 8 above.
-
- 12. Running the inference net. Now click with the Left Mouse Button over
- the centre of the right-hand box. Up comes a small panel at the top of the
- Control Screen containing a few buttons, the Attribute Action panel. The
- two buttons on the left are: Reset and Infer, which allow you to run the
- KB. Hit Reset, then hit Infer. Up comes a User Question panel, with text
- at the top showing the name/label of one of the antecedent attributes, a
- large central Value gadget, a slider, and an large OK gadget to right, with
- a few others. Enter a Value by sliding the slider over the the right using
- the LMB and hit OK with LMB. Then a similar panel should appear for the
- next attribute. And the next. If you have three antecedent (left-hand)
- boxes feeding into the consequent (right-hand) one you should get three
- such User Question panels. (Oops: No panels come up. Have you hit Reset
- then Infer? Oops: Only one Question panel comes up. Maybe you have the
- Action panel for one of the antecedent attributes? A glance at its title
- will give the name/label of the attribute for which it is the Action
- panel.)
-
- 12a. (The meaning of the values given by the sliders will become clear
- when you start the chapter Using Istar.)
-
- 13. Seeing the result. When the question sequence has finished, the
- Attribute Action panel is still there. Hit the Data button, and you are
- taken to the Attribute Details panel. The result should be shown in the
- slider gadget on the second row in the middle - and it should show
- somewhere over to its right end if you slid all the antecedent sliders over
- to the right.
-
- 14. Control Screen. You can drag the Control Screen up and down using the
- thin white line along its top, just above the strip where the meaning texts
- appear. Use the tip of the mouse pointer and LMB to do this. Half way up
- is not a very convenient place, so you can park it by dragging the screen
- down to reveal more of the Easel and hitting the second gadget from the
- left on the Control Screen strip. This is the parking button. From then
- on this is where the Control Screen returns to. Whenever you want to
- access the Control Screen, hit the Gadget showing two arrows at left edge
- of the top strip of the Control Screen. Up it comes. Hit it again, and it
- parks back down the bottom.
-
- GOING FURTHER STILL - DIFFERENT TYPES
-
- 15. Different item types. Bring up the control screen. Look at the KB
- panel. It has two listview gadgets. The left-hand of these is a list of
- item types (Free Bayesian, Free Integer, etc.). Select 'Free Integer' by
- hitting it with the LMB. Send Control Screen away (hit the left-most two-
- arrows button) to reveal the Easel.
-
- 16. Scrollable Easel. Ensure the Easel is active (step 10a). Now move
- the mouse over to the right hand side and keep moving. The Easel scrolls
- smoothly to the left - a tribute to the Amiga's hardware-assisted
- scrolling. This allows you to traverse a large knowledge base - and, since
- scrolling happens even during drawing, allows you to draw very long links.
- But, for now, we use it to gain empty space for a new inference net.
-
- 17a. Draw a new box on the Easel in some empty space (= step 4) - it
- should say 'Integer' in it and be a different colour from the Bayesian
- boxes you had before. Give it a name/label of 'Result' (= step 9).
-
- 17b. Draw three antecedent boxes for it (to its left), and link them to
- the Result. Give them three different names e.g. 'I1', 'I2', 'I3'. (Note
- that this little inference net is not connected to the earlier one you
- drew.)
-
- 18. Run this wee inference net. (Step 12: click over Result box with LMB
- to bring up its Action panel and hit Reset then Infer.) The User Question
- panels will now show, not a slider value gadget, but a rectangle which says
- '0' and into which you can type a number. In each of the three that comes
- up type a number, say 5, 6 and 7.
-
- 19. Hit the Data button on Result's Action panel, and its Attribute
- Details panel should appear, showing as its value the sum of the numbers
- you entered (18 for the above numbers).
-
- 20. To run it again there is a short cut to the Action panel, the OK-Act
- button near its bottom. Hit that. (It short-cuts the process of hitting
- OK and then finding the box and clicking on it with LMB.) The Attribute
- Action and Attribute Details panels form a pair, and each is accessible
- from the other: the OK-Act button brings up the Action panel and the Data
- button thereon brings up the Details panel. Run it again, making sure this
- time that the three numbers you enter are all above 1.
-
- 21. Different Inference Method. When the question sequence has stopped,
- hit the Data button to bring up the Details panel. On about the fourth row
- you should see a radio button saying 'Inferred' and to its right a string
- in a slot that says "X = A + B, C, ...". This is the inference method by
- which the values of all the antecedents are combined to give this
- attribute's value. "X = A + B, C, ..." means "Add all the antecedent
- values together - X refers to this current attribute (labelled 'Result'), A
- refers to the first antecedent, B to the second, and so on. You can select
- another inference method: attached at the left end of the slot is a wee
- button; hit it with LMB. Up comes a list of inference methods. Select
- multiplication, shown by "X = A * B, C, ...". Hit the OK button on this
- list to send it away, and the string in your slot should be updated
- accordingly.
-
- 22. Now run the inference net again. (Step 20: notice how convenient the
- OK-Act button is when you are changing things like inference method and
- trying it out.) Make sure all numbers are above 1. Look at the Result
- Data. (If you entered 5, 6, 7 the result value should now be 210.)
-
- 23. Suppressing irrelevant information. Note that Istar only asks
- questions that it needs to, and thus avoids asking irrelevant ones. With
- multiplication this happens if one of the antecedents is zero - we then
- know the consequent will be zero, whatever values the remaining antecedents
- take, so there is no point asking them. Try it: run the inference net
- again (step 20) and enter the second number as 0. It should not then ask
- the third number.
-
- 23a. (There are various item types for which this effect can occur.
- Integers with multiply, Booleans with AND or OR, and anything with Chooser
- inference method, etc.)
-
- 24. Short-cut to changing item type. The main way of selecting item type
- for your next box is to bring up the control screen, hit the item type
- listview gadget for the type you want. A bit of a nuisance; there is a
- short-cut if you have a box of that type already showing on the Easel:
- press 'T' for Type over that box and Istar will select its type. You have
- two types, Bayesian and Integer, with (Free) Integer currently selected.
- Ensure the Easel is active (step 10a). Then move the mouse pointer over
- one of your earlier Bayesian boxes and press the T key. The item type
- should select Free Bayesian. If you now draw a box it will be of Bayesian
- type.
-
- 25. Automatic Type Conversion. Find some spare space on the Easel (step
- 16), create a (Free) Probability box to the left and an Integer to the
- right. Link the Bayesian box as antecedent of the Integer. Run this
- little inference net; you should be presented with a slider in the User
- Question panel. Slide the Probability to some suitable number, say 90.
- Look at the value in the Integer attribute; it should say 90 (though early
- versions of Istar might be one out due to rounding errors!). As far as
- possible Istar intelligently converts from one value type to another.
-
- 26. Some errors. Don't be scared of errors. Try experiencing a few
- errors that might happen - if you have not already done so! Most do not do
- any harm.
-
- # Separating mouse from link end. You might have noticed that
- occasionally after starting to draw link the mouse pointer is
- separated slightly from the end of the link. It happens because
- there is a very slight delay between pressing of LMB and appearance
- of the link, and in this delay the mouse could have moved away
- slightly. Note that it is the end of the link that is the important,
- active point, not the mouse pointer. So it is the end of the link
- that should be dropped into the target box, rather than the mouse
- pointer. Yhis feature is deliberate as it allows the mouse pointer
- to be moved out of the way of the active point, so you can see more
- clearly exactly where the end of the link is going. Useful in a
- cluttered Easel. (The same can also happen with drawing boxes,
- bending links, or whatever.)
-
- # Link not formed. In drawing a link, if you release LMB such that
- the end of the link is over empty space then it will not be formed -
- because it must link to something. This can happen when link end and
- pointer are separated and you place the pointer rather than link end
- over the box.
-
- # Cannot link item to itself. With any box, start drawing a link
- from its right or left edge but release LMB while the end of the link
- is inside the same box. An error panel appears. Hit OK.
-
- # Cannot create a cycle. With one of the inference nets you have
- drawn, start drawing a link from the right-hand edge of the right-
- most box and (step 6b) bend it round to the left until it is over one
- of the antecedents, thus creating a cycle in the inference net. This
- is not allowed; an error panel appears. Hit OK.
-
- # Invisible parts of net. Some keys hide parts of the net. e.g.
- the A or C keys show antecedents and consequents of a box. Useful in
- simplifying a large net. But if hit inadvertently can be confusing
- as you will see links ending in empty space etc. If this has
- happened then hit the Enter Key on numeric keypad. This restores
- all.
-
-
- WHAT MORE IS THERE?
-
- Lots more. That should more than get you started. But there's lots more:
-
- # Larger inference nets
- # Multi-step
- # Loop prevention
- # Scrolling
- # Zooming
- # Showing parts
- # Goal lists
- # Topics
- # Find
- # Forms
- # Creating new item types, multiple attributes
- # Creating new attribute types
- # Document creation
- # KB Dump, save, load.
- # etc.
-
-
- ** IF YOU WISH, YOU CAN NOW GO STRAIGHT TO <USING ISTAR>.
-
-
- STARTING FROM CLI
-
- To start Istar from CLI, simply type "Istar", maybe appending the version
- number if there is one. (I assume that you are familiar with paths etc. or
- how to activate a program in another directory.)
-
- Advanced use:
- From CLI you can start with various tracing on, by adding the
- parameters:
-
- "-tm" to trace some activity in the modules mechanism
- "-tu" to trace some UA module activity
- "-te" to trace some activity among easels
-
- so the command might be:
-
- Istar1.04 -tu -te
-
- This will usually only be of value when you suspect some bug and want to
- send me a trace of what happens.
-
-
- STARTING WITH LOW MEMORY
-
- The standard startup will just about start in a base 2 Mb A1200 as long as
- your Workbench screen is simple PAL 640 by 256 and only 4 colours. But in
- other situations, from Version 1.04 onwards, you can take action to reduce
- the amount of memory needed for your KB, before you create it. There are
- two ways of doing this.
-
- LOW MEMORY METHOD 1:
-
- This method involves starting up and immediately altering some of the
- preferences via the Prefs panel.
-
- # As soon as the Initial Control Panel comes up, click on the Prefs
- button to bring up the Preferences panel.
-
- # Alter the MinDSA figure (usually 50000 longwords) to e.g. 10000;
- this reduces the size of a new KB from around 20000 bytes to around
- 40000.
-
- # Alter the size of the Easel from 1920 by 768 to something smaller,
- such as 640 by 256. If its Depth is shown as 4 or higher reduce it
- to 3. Doing these reduces the amount of memory for the Easel of a
- new KB. The original size easel consumes around 200 kbytes for each
- bitplane, whereas 640 by 256 consumes only around 20 kbytes per
- bitplane.
-
- Note, though, that you should only do this if you can work with a small KB
- or easel. Also, doing this will not alter the sizes of KB or easel that
- are loaded from file.
-
- LOW MEMORY METHOD 2:
-
- Altering the preferences each time you load up can be tedious. So Istar
- can also load preferences from a file as it enters, which in version 1.04
- is the file IstarSys:IstarPrefs (that is, IstarPrefs in the drawer to which
- IstarSys: is assigned). So all you need to do is supply such a file,
- according to your needs.
-
- A file, IstarPrefs_LowMem is already supplied, so you need only enter
- the following command from a CLI:
-
- COPY IstarSys:IstarPrefs_LowMem IstarSys:IstarPrefs
-
- Bring up the Prefs panel to see the sizes it has given you. If you wish
- anything different then make up your own IstarPrefs file. There are many
- other Preferences that can be set via this file. See 'Preferences' section
- in the 'KBs' chapter for details.
-
-
- WHAT IS AN ITEM?
-
- An item in Istar is some focus of attention in the knowledge base. It is
- represented on the Easel by a box or group of boxes that move together. An
- item can have:
-
- # any number of attributes (so far they have had only 1)
- # relationships to other items
-
- On the Item Type list on the KB panel, select 'Contract Meaning'. This is
- an item expressed by two boxes, when you draw it on the Easel. The top one
- represents the item itself, the bottom one an attribute of the item.
-
- You can define your own item types. Let's try doing so. Hit the
- 'New' button below the Item Type list. A new panel, Create New Item Type
- (CNIT) comes up for an item type called 'Unnamed'. Change the name to
- 'Employee'.
-
- Now we will add attributes to the item type. To add each attribute
- to an item type we do three things:
-
- 1. Set the type
- 2. Set the name
- 3. Click the addition button just above the Type.
-
- So first, hit the Type wee button, and select String from the list that
- comes up; hit its OK button. Then in the Attribute name to the left of the
- Type, enter 'Name'. Now hit the button above Type. 'Name' will appear in
- the list in the middle of the panel. Now create an attribute called 'Age',
- of type Integer using the same steps. Now create an attribute called 'Day
- off' of Type 'Weekdays'. Lastly, create an attribute called 'Salary' of
- Type Integer.
-
- Then press OK (called Done in some versions) on the CNIT panel, and
- it disappears. Look at the SIT panel and you will see 'Employee' has been
- added at the bottom and should be selected (if not, select it).
-
- Now draw on the Easel and you should get a tall box group with five
- boxes: a smaller one at the top representing the employee itself, with four
- attribute boxes: Name, Age, Day off, Salary.
-
- Notice the similarity to databases: item = entity or record,
- attribute = attribute or field. Unlike many databases new item types can
- be created at any time. And (probably not this version) new attributes can
- be added to existing item types.
-
-
- WHAT IS AN ATTRIBUTE?
-
- An attribute is a holder of a value - such as Name, Age, etc. It can be of
- two types: in an item or a free attribute. Each attribute is expressed by
- a box. When you started above, you were drawing (creating) free
- attributes. When you drew the Employee box group you created an item with
- for attributes. Free attributes actually belong to a hidden item, for
- which there is no visible box.
-
- Attributes can be of a variety of types, which normally are defined
- in terms of value types (see below).
-
- It became clear during the INCA research project that the
- conventional picture, of items with several attributes, was not always
- appropriate. In an inference net a lot of items exist merely to support a
- single attribute, and so Istar developed the idea of 'free attributes', in
- which the item is still there for structural purposes but is de-emphasized
- and not shown on the easel. So in the Select Item Type panel the first set
- of items is normally a load of free attributes. They are represented by
- single boxes. Whether they are called attributes or items is immaterial.
-
-
- Copyright (c) Andrew Basden, 1996
-